#include <iostream>

/**
 * 结构体属于用户自定义的数据类型，允许用户存储不同的数据类型
 */
struct Student2 {
    std::string name;
    int age;
    int score;
};

struct Teacher {
    int id;
    std::string name;
    int age;
    Student2 s2;
};

int main() {
    Student2 s2;

    Teacher t;
    t.id = 1000;
    t.s2.name = "学生";

    Teacher t1 = {
            1, "df", 2, s2.name = "霓虹"
    };


    // p->name 通过指针访问结构体变量中的数据
    std::cout << t1.s2.name << std::endl;
}